package demo5.dao;

import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.Random;

@Repository
public class UserDAOImpl implements IUserDAO{
    @Override
    public boolean findUser(){
        System.out.println("UserDAO:根据用户名密码查询用户信息");
        double random = Math.random();
        if (random > 0.5) {
            System.out.println("UserDAO:用户信息查询成功");
            return true;
        } else {
            System.out.println("UserDAO用户信息查询失败");
            return false;
        }
    }
}
